package com.itmentu.mapper;

import com.itmentu.pojo.IdCard;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

/**
 * @Author：http://www.itmentu.com
 * @date： 2021/12/4 18:56
 * @Description：
 ***/
public interface IdCardMapper {

    /**
     * 查询所有
     */
    @Results(
        id = "idCardResult",
        value = {
            @Result(column = "id",property = "id",id = true),
            @Result(column = "card_city",property = "city"),
            @Result(column = "card_province",property = "province"),
            @Result(column = "card_area",property = "area"),
            @Result(column = "card_real_name",property = "realName"),
            @Result(column = "card_birthday",property = "birthday")
        }
    )
    @Select("select * from id_card where id=#{id}")
    IdCard one(String id);
}
